<script setup lang="ts">
const clickFn = () => {
  alert('点我干嘛?')
}
</script>

<template>
  <button @click="clickFn">点我</button>
  <div class="box" @click="clickFn()"></div>
</template>

<style>
.box {
  width: 200px;
  height: 200px;
  background-color: red;
}
</style>
